<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .bodyBac{
            background-color: rgb(56, 205, 96);
        }
        .night{
            background-color: black;
        }
        .day{
            background-color: white;
        }
    </style>
</head>
<body class="bodyBac">
    <button onclick="beNight()">夜间</button>
    <button onclick="beDay()">白天</button>
    <script>
        function beNight() {
           document.body.className = 'night'
        }
        function beDay() {
            document.body.className = 'day'
        }
    </script>
</body>
</html>